package com.jd.risk.bankorder.util;

import java.util.ResourceBundle;

import com.wangyin.commons.util.Logger;
import com.wangyin.commons.util.LoggerFactory;

/**
 * 配置文件工具类
 * @author lixuran
 *
 */
public class PropertiesUtils {

	private  static Logger logger = LoggerFactory.getLogger(PropertiesUtils.class);
	
	
	
	public static ResourceBundle getProperties(String propertiesFileName){
		ResourceBundle resource = null;
		try {
			
			resource =  ResourceBundle.getBundle(propertiesFileName);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
		}
		return resource;
	}
	
	
	public static String getSystemAccountMemberid(String key){
		ResourceBundle resource = null;
		try {
			resource =  ResourceBundle.getBundle("sysaccount");
			if(resource != null){
				return resource.getString(key);
			}
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
		}
		return "";
	}
	
	public static String getExportFilePath(String key){
		ResourceBundle resource = null;
		try {
			resource =  ResourceBundle.getBundle("exportfilepath");
			if(resource != null){
				return resource.getString(key);
			}
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
		}
		return "";
	}
	
	
	public static void main(String[] args) {
		System.out.println(PropertiesUtils.getSystemAccountMemberid("riskBankAccount.memberid"));
	}
}

